
## End User configurable options ###
SHELL = @SHELL@

@VPATH@
# Installation directories
prefix       = @prefix@
exec_prefix  = @exec_prefix@
bindir       = @bindir@
includedir   = @includedir@
libdir       = @libdir@
# Build directories
libbuild_dir = @libbuild_dir@
top_srcdir   = @top_srcdir@
srcdir       = @srcdir@

JC           = @JC@
JAR          = @JAR@
RM           = @RM@

TARGET    = $(libbuild_dir)/legends.jar
PACKAGE   = viewer.legends
SRC       = Const.java CategoryIcon.java CategoryLabel.java \
            CategoryIconRenderer.java CategoryIconEditor.java \
            LegendComparators.java LegendTableModel.java \
            Triangular3DIcon.java GenericHeaderRenderer.java \
            TableHeaderHandler.java TableColumnHandler.java \
            OperationBooleanMenu.java OperationStringMenu.java \
            OperationNumberMenu.java \
            LegendTable.java LegendPanel.java LegendFrame.java

OBJ       = $(SRC:.java=.class)

.SUFFIXES:	.java .class .jar

# CLASSPATH = .:/pkgs/lang/java/jdk117_v3/lib/rt.jar:/pkgs/lang/java/jdk117_v3/lib/classes.zip:/pkgs/lang/java/jdk117_v3/classes:/home/chan/mpe_work/mpe/viewers/jumpshot-3/swing/swing.jar
SRCDIR     = $(top_srcdir)
CLASSDIR   = ../..
CLASSPATH  = ../..
PKGDIR     = viewer/legends

JCFLAGS = -sourcepath @JPATH_START@$(SRCDIR)@JPATH_FINAL@ -classpath @JPATH_START@$(CLASSPATH)@JPATH_FINAL@ -d @JPATH_START@$(CLASSDIR)@JPATH_FINAL@ @JFLAGS@

.java.class:
	$(JC) $(JCFLAGS) $(JFLAGS) @JPATH_START@$<@JPATH_FINAL@

ALL: $(OBJ)

$(TARGET): $(OBJ)
	cd $(CLASSDIR) && \
	$(RM) $(PACKAGE).manifest && \
	echo "Main-Class: $(PACKAGE).LegendFrame" > $(PACKAGE).manifest ; \
	jarfile=@JPATH_START@$@@JPATH_FINAL@ ; \
	$(JAR) $(JARFLAGS)cfm $${jarfile} $(PACKAGE).manifest ; \
	for dir in base/io/ base/topology/ base/drawable/ \
	           logformat/slog2/ logformat/slog2/input/ \
	           viewer/common/ $(PKGDIR)/ ; do \
	    classdir_prefix=@JPATH_START@$${dir}@JPATH_FINAL@ ; \
	    $(JAR) $(JARFLAGS)uf $${jarfile} $${classdir_prefix}*.class ; \
	done ; \
	$(JAR) $(JARFLAGS)uf $${jarfile} images/*.gif applet.html

clean:
	cd $(CLASSDIR) && \
	$(RM) $(PKGDIR)/*.class

rmlib:
	$(RM) $(TARGET)

realclean: clean rmlib

distclean: realclean
	@-$(RM) Makefile
